<!--<!DOCTYPE html>-->
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>禄舍轩餐饮管理有限公司诚邀加盟</title>
    <meta name="description" content="禄舍轩餐饮管理有限公司诚邀加盟" />
    <meta name="author" content="order by adminbuy.cn M126" />
    <meta name="applicable-device" content="pc,mobile" />
    <meta name="referrer" content="no-referrer" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/houtai/layuiadmin/layui/css/layui.css"  media="all">
    <link href="/houtai/css/bootstrap.css" rel="stylesheet" />
    <link href="/houtai/css/bxslider.css" rel="stylesheet" />
    <link href="/houtai/css/style.css" rel="stylesheet" />
    <script src="/houtai/js/jquery-2.1.4.js"></script>
    <script src="/houtai/js/vue.js"></script>
    <script src="/houtai/js/bxslider.min.js"></script>
    <script src="/houtai/js/common.js"></script>
    <script src="/houtai/js/bootstrap.js"></script>
</head>

<body>
<div id="content">
    <header>
        <div class="top_bg">
            <div class="container"> <span class="top_email">欢迎访问禄舍轩餐饮有限责任公司！</span> </div>
        </div>
        <div class="container">
            <div class="row">
                <div class="col-xs-12 col-sm-4 col-md-4" style="width: 100%;">
                    <div style="float: left;width: 270px;">
                        <img src="http://q8rihi6ox.bkt.clouddn.com/logo.png" class="logo" />
                    </div>
                    <div style="float: left;width: 200px;margin-top: 20px;">
                        <div> <img src="http://q8rihi6ox.bkt.clouddn.com/tel.png" style="float: left;"> <span>全国服务热线：</span>
                            <p style="font-size: 20px;float: left;color: red;font-weight:700">13389671866</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- Fixed navbar -->
    </header>
    <div class="layui-carousel" id="test10">
        <div carousel-item="" id="imgHead">
        </div>
    </div>
    <div class="container">
        <div class="row">
            <div class="product_head" data-move-y="-40px">
                <h2>菜品展示</h2>
                <span>PRODUCT SHOW</span> </div>
            <div class="col-xs-12 col-sm-12 col-md-12">
                <div class="product_list" id="imgMeal">
                </div>
            </div>
        </div>
    </div>

    <div class="about_serv" style="background-image: url(http://q8rihi6ox.bkt.clouddn.com/轮播图1.jpg); background-size: cover;">
        <div class="container">
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-6 left col"> </div>
                <div class="col-xs-12 col-sm-6 col-md-6 right col">
                    <h2>关于我们</h2>
                    <span>ABOUT US</span>
                    <p class="about_contents">
                    <h3 class="about_h3">WELCOME TO FRESH VEGE SHOP</h3>
                    <p class="about_p"></p>
                    <div class="about_content">
                        <p>
                            <span style="line-height:3;" id="aboutUs"></span>
                        </p>
                        <p> <span style="line-height:2;"><span style="line-height:3;"></span><br />
									</span>
                        </p>
                    </div>
                    </p>
                    <p></p>
                </div>
            </div>
        </div>
    </div>

    <div class="container">
        <div class="row">
            <div class="product_head" data-move-y="-40px">
                <h2>加盟门店</h2>
                <span>SHOP SHOW</span> </div>
            <div class="col-xs-12 col-sm-12 col-md-12">
                <div class="product_list" id="imgCase">
                </div>
            </div>
        </div>
    </div>

    <div class="met-index-contact met-index-body">
        <div class="container">
            <div class="row">
                <div class="col-md-5">
                    <p style="text-align: left;">
                                <span style="font-size: 24px; color: rgb(242, 242, 242);"><br/>
                                        </span>
                    </p>
                    <p style="text-align: left;">
                        <span style="font-size: 24px; color: rgb(47, 47, 47);">重庆市九龙坡区禄舍轩餐饮有限责任公司</span>
                    </p>
                    <p style="text-align: left;">
                        <span style="color: rgb(47, 47, 47); font-size: 16px;">加盟热线：133-8967-1866<br/></span>
                    </p>
                    <p style="text-align: left;">
                        <span style="color: rgb(47, 47, 47); font-size: 16px;">地址：重庆市九龙坡区袁家岗162号16-2号</span>
                    </p>
                    <p style="text-align: left;"><span style="color: rgb(191, 191, 191); font-size: 16px;"><br/></span></p>
                    <p class="font-size-20"> </p>
                </div>
                <form id="insertForm">
                    <div class="col-md-7">
                        <div class="form-group" style="width: 200px;">
                            <input name='name' id="name" class='form-control' type='text' placeholder='您的姓名 ' />
                            <span style="color: red" id="nameMes" hidden>姓名不能为空</span>
                        </div>
                    </div>
                    <div class="form-group" style="width: 350px;margin: 10px 15px;">
                        <div style="float:left;width:200px;margin-right: 5px;">
                            <input name='tel' id="tel" class='form-control' type='text' placeholder='您的电话 ' />
                            <span style="color: red" id="telMes"></span>
                        </div>
                        <div class="form-group margin-bottom-0" style="float: left;width: 130px;">
                            <input type="button" @click="sendVercode" id="sendVercode" class="btn btn-primary btn-block btn-squared" value="获取验证码">
                        </div>
                    </div>
                    <div class="form-group" style="width: 200px;margin-left: 15px;">
                        <input name='verCode' id="vercode" class='form-control' type='text' placeholder='验证码 ' />
                    </div>
                    <div class="form-group" style="width: 200px;margin-left: 15px;" hidden>
                        <input name='status' id="status" class='form-control' value="" />
                    </div>
                    <span style="color: red" hidden id="checkVercode">验证码错误</span>
                    <div class="form-group margin-bottom-0" style="width:200px;margin-left: 15px;">
                        <input type="button" class="btn btn-primary btn-block btn-squared" @click="insertSubmit" value="提交">
                    </div>
                </form>
            </div>

        </div>

    </div>
</div>

<script data-cfasync="false" src="/houtai/js/email-decode.min.js"></script>
<script type="text/javascript" src="/houtai/js/su_new.js"></script>
<script src="/houtai/js/jquery.smoove.min.js"></script>
<script src="/houtai/layuiadmin/layui/layui.js" charset="utf-8"></script>

<script>
    $('.product_head,.news_head,.news_img,.about_head,.js_about_left,.js_about_right').smoove({
        offset: '10%'
    });
</script>
<script type="text/javascript">
    $('.bxslider').bxSlider({
        adaptiveHeight: true,
        infiniteLoop: true,
        hideControlOnEnd: true,
        auto: true
    });
</script>

<script>
    var ins;
    var layer;
    layui.use(['carousel','layer'], function() {
        var carousel = layui.carousel;
        layer = layui.layer;
        ins = carousel.render({
            elem: '#test10',
            width: '100%', //设置容器宽度
            height: '200px',
            // arrow: 'always', //始终显示箭头
        });
    });
    var vue = new Vue({
        el:"#content",
        data:{
            aboutUs:{},
            joinImgHead:[],
            joinImgMeal:[],
            joinImgCase:[],
            business:{},
            vercodeIsRight:false
        },
        created:function () {
            $.ajax({
                url:"/houtai/page/deploy/join/getJoinImgHeads",
                type:"post",
                dataType:"json",
                success:function (data) {
                    var _this = this;
                    var html="";
                    console.log(data);
                    if(data.message == "success"){
                        _this.joinImgHead = data.li;
                        for(var i = 0;i < data.li.length;i++){
                            html+='<div><img style="width: 100%;height: 100%" src="'+ data.li[i].businessHeadImgUrl +'"></div>';
                        }
                        $("#imgHead").append(html);
                        //重置轮播
                        ins.reload({
                            elem: '#test10',
                            width: '100%', //设置容器宽度
                            height: '200px',
                            // arrow: 'always', //始终显示箭头
                        });
                    }else{
                        location.href = "/houtai/page/exception/500.html";
                    }
                }
            });
            $.ajax({
                url:"/houtai/page/deploy/join/getJoinImgMeals",
                type:"post",
                dataType:"json",
                success:function (data) {
                    var _this = this;
                    console.log(data);
                    if(data.message == "success"){
                        _this.joinImgMeal = data.li;
                        var html = "";
                        for(var i = 0;i < data.li.length;i++){
                            html+='<div class="col-sm-4 col-md-4 col-mm-6 product_img" data-move-y="50px">'+
                                    '<img src="'+ data.li[i].joinImgMealUrl +'"  class="img-thumbnail" />'+
                                    '</div>';
                        }
                        $("#imgMeal").append(html);
                    }else{
                        location.href = "/houtai/page/exception/500.html";
                    }
                }
            });
            $.ajax({
                url:"/houtai/page/deploy/join/getJoinImgCases",
                type:"post",
                dataType:"json",
                success:function (data) {
                    var _this = this;
                    console.log(data);
                    if(data.message == "success"){
                        _this.joinImgCase = data.li;
                        var html = "";
                        for(var i = 0;i < data.li.length;i++){
                            html+='<div class="col-sm-4 col-md-4 col-mm-6 product_img" data-move-y="180px">'+
                                '<img src="'+ data.li[i].joinImgCaseUrl +'"  class="img-thumbnail" />'+
                                '</div>';
                        }
                        $("#imgCase").append(html);
                    }else{
                        location.href = "/houtai/page/exception/500.html";
                    }
                }
            });
            $.ajax({
                url:"/houtai/page/deploy/join/getAboutus",
                type:"post",
                dataType:"json",
                success:function (data) {
                    var _this = this;
                    console.log(data);
                    if(data.message == "success"){
                        _this.aboutUs = data.obj;
                        $("#aboutUs").text(data.obj.aboutusDesc)
                    }else{
                        location.href = "/houtai/page/exception/500.html";
                    }
                }
            });
        },
        methods:{
            sendVercode:function(){
                console.log("发送验证码了");
                var tel = $("#tel").val();
                if(!/^1[3456789]\d{9}$/.test(tel)){
                    $("#telMes").text("请输入正确的手机号");
                }else{
                    $("#telMes").text("");
                    $.ajax({
                        url:"/weixin/user/sendVercode",
                        data:{tel:tel},
                        type:"post"
                    });
                    var time = 180;
                    var timer = setInterval(function(){
                        time--;
                        $("#sendVercode").val("（"+time+"秒）重发");
                        $("#sendVercode").prop("disabled",true);
                        if(time==0){
                            clearInterval(timer);
                            $("#sendVercode").val("获取验证码");
                            $("#sendVercode").prop("disabled",false);
                        }
                    },1000);
                }
            },
            checkName:function(){
                var name = $("#name");
                console.log("检查名字了");
                if(name == null || name.trim() == ''){
                    $("#nameMes").text("姓名不能为空");
                    return false;
                }else{
                    $("#nameMes").text("");
                    return true;
                }
            },
            checkTel:function(){
                var tel = $("#tel");
                if(!/^1[3456789]\d{9}$/.test(tel)){
                    $("#telMes").text("请输入正确的手机号");
                    return false;
                }else{
                    $("#telMes").text("");
                    return true;
                }
            },
            insertSubmit:function () {
                var _this = this;
                var tel = $("#tel").val();
                var vercode = $("#vercode").val();
                console.log(vercode);
                if(vercode != null && vercode.trim() != ''){
                    $.ajax({
                        url:"/weixin/user/checkVercode",
                        data:{"phone":tel,"yzm":vercode},
                        type:"post",
                        dataType:"json",
                        success:function (data) {
                            if(data.message.trim()=="success"){
                                var name = $("#name");
                                $("#checkVercode").attr("hidden",true);
                                if(name != null && name!= ''){
                                    $("#nameMes").attr("hidden",true);
                                    $.ajax({
                                        url:"/houtai/page/franchisees/insert",
                                        data:$("#insertForm").serialize(),
                                        type:"post",
                                        dataType:"json",
                                        success:function (dat) {
                                            if(dat.message== "success"){
                                                alert("提交成功，请等待工作人员联系");
                                                window.location.reload();
                                            }else{
                                                alert("提交失败，请重新提交");
                                            }
                                        }
                                    })
                                }else{
                                    $("#nameMes").attr("hidden",false);
                                }
                            }else{
                                $("#checkVercode").attr("hidden",false);
                            }
                        }
                    })
                }

            }
        }
    })
</script>
</body>

</html>